package me.macd.mindoc.model;

import me.macd.mindoc.annotation.Table;

import java.util.Date;

@Table(tableName = "md_attachment", primaryKey = "attachment_id")
public class Attachment {
    private Integer attachmentId;

    private Integer bookId;

    private Integer documentId;

    private String fileName;

    private String filePath;

    private Double fileSize;

    private String httpPath;

    private String fileExt;

    private Date createTime;

    private Integer createAt;

    public Attachment(Integer attachmentId, Integer bookId, Integer documentId, String fileName, String filePath, Double fileSize, String httpPath, String fileExt, Date createTime, Integer createAt) {
        this.attachmentId = attachmentId;
        this.bookId = bookId;
        this.documentId = documentId;
        this.fileName = fileName;
        this.filePath = filePath;
        this.fileSize = fileSize;
        this.httpPath = httpPath;
        this.fileExt = fileExt;
        this.createTime = createTime;
        this.createAt = createAt;
    }

    public Attachment() {
        super();
    }

    public Integer getAttachmentId() {
        return attachmentId;
    }

    public void setAttachmentId(Integer attachmentId) {
        this.attachmentId = attachmentId;
    }

    public Integer getBookId() {
        return bookId;
    }

    public void setBookId(Integer bookId) {
        this.bookId = bookId;
    }

    public Integer getDocumentId() {
        return documentId;
    }

    public void setDocumentId(Integer documentId) {
        this.documentId = documentId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName == null ? null : fileName.trim();
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath == null ? null : filePath.trim();
    }

    public Double getFileSize() {
        return fileSize;
    }

    public void setFileSize(Double fileSize) {
        this.fileSize = fileSize;
    }

    public String getHttpPath() {
        return httpPath;
    }

    public void setHttpPath(String httpPath) {
        this.httpPath = httpPath == null ? null : httpPath.trim();
    }

    public String getFileExt() {
        return fileExt;
    }

    public void setFileExt(String fileExt) {
        this.fileExt = fileExt == null ? null : fileExt.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Integer createAt) {
        this.createAt = createAt;
    }
}